package com.feng.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feng.domain.entity.Role;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 角色信息表(Role)表数据库访问层
 *
 * @author makejava
 * @since 2022-10-15 11:32:14
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 查询用户所具有的角色信息
     * @param userId
     * @return
     */

    List<String> selectRoleKeyByUserID(Long userId);

    /**
     * 根据用户id查询role相关的信息
     * @param id
     * @return
     */
    List<Role> selectRoleByUserId(Long id);

    List<Long> selectRoleIdByUserId(Long userId);
}
